import { createSSRApp } from 'vue'
import App from './App.vue'
import { createPinia } from 'pinia'
import { bootSetup } from '@/setup'
import GlobalContainer from '@/components/GlobalContainer/index.vue'
import GlobalHeader from '@/components/GlobalHeader/index.vue'
import GlobalIconfont from '@/components/GlobalIconfont/index.vue'

export function createApp() {
  const app = createSSRApp(App)
  app.use(createPinia())
  bootSetup(app)
  app.component('GlobalContainer', GlobalContainer)
  app.component('GlobalHeader', GlobalHeader)
  app.component('GlobalIconfont', GlobalIconfont)
  return {
    app
  }
}
